{echo:JS::import('dialog?skin=brief');}
{echo:JS::import('dialogtools');}
{echo:JS::import('form');}
{echo:JS::import('date');}
<style type="text/css">
    #table_option td{
        width: 8px;
        height: 8px;
        background: #ddd;
        border:1px #999 solid;
        cursor: pointer;
    }
</style>
<h1 class="page_title">{$title}</h1>
<form action="{url:/app/version_save}" method="post" id="appForm" enctype="multipart/form-data">
<div id="obj_form" class="form2">
<dl class="lineD">
        <dt>操作系统：</dt>
        <dd>
          <label>Android</label>
        </dd>
        </dl>
		<dl class="lineD">
        <dt onclick="show()">版本 code：</dt>
        <dd>
         	<input type="text" name="version_code" value="{$obj['version_code']}" readonly/>
        </dd>
        </dl>
      	<dl class="lineD">
        <dt><b class="red">*</b> 版本号：</dt>
        <dd>
          <input type="text" id="version_no" name="version_no" value="{$obj['version_no']}" class="big" >
        </dd>
        </dl>
        {if:$obj['id'] == null}
        <dl class="lineD">
        <dt><b class="red">*</b> APP：</dt>
        <dd>
          <!-- <input type="text" name="app" class="big" pattern="required"  alt="不能为空！" > -->
          
          	<input type="file" name="upApp" id="upApp" class="big"/>          
        </dd>
        </dl>
        {/if}
        <dl class="lineD">
        <dt>是否强制更新：</dt>
        <dd>
          <select name="now_update">
          	{if: $obj['now_update'] == '1'}
          		<option value="0" >否</option>
          		<option value="1" selected="selected">是</option>
          	{else:}
          		<option value="0" selected="selected">否</option>
          		<option value="1">是</option>
          	{/if}
          </select>
        </dd>
        </dl>
        <dl class="lineD">
        <dt>版本描述：</dt>
        <dd>
          <textarea name="introduct" >{$obj['introduct']}</textarea>
          <label></label>
        </dd>
        </dl> 
      </div>
      <input type="hidden" name="id" value="{$obj['id']}"/>
      <!--活动描述 end-->
      <div style="text-align:center">
      	<input type="submit" value="提交" class="button" onclick="return check();">
      	&nbsp;&nbsp;&nbsp;&nbsp;
      	<input type="reset" value="重置" class="button"></div>
</form>
<script type="text/javascript">
function check()
{
	if($("#version_no").val()=="")
	{
		$(".invalid-msg").remove();
		$("#version_no").after("<label class='invalid-msg'>版本号不能为空</label>");
		return false;
	}
	else
	{
		$("#version_no").next().remove();
	}
	if($("#upApp").val()=="")
	{
		$(".invalid-msg").remove();
		$("#upApp").after("<label class='invalid-msg'>上传文件不能为空</label>");
		return false;
	}
	else
	{
		$("#upAp").next().remove();
	}
}
$("#table_option td:eq({$contents[0]['position']})").css("background","#000");
</script>